/**
 * Created by Administrator on 2017/2/25.
 */
var mood = "happy".length > 3 ? "true" : "false";
var count = 3;

var beatles = ["joe", "alfa"]

joe_func11 = function () {
    beatles.forEach(alert)
}

function insertParagraph(text) {
    var str = "<p>";
    str += text;
    str += "</p>";
    document.write(str);
}

function domInsert() {
    var para = document.createElement("p");
    var testdiv = document.getElementById("testdiv");
    testdiv.appendChild(para);

    var txt = document.createTextNode("Hello word");
    para.appendChild(txt);

    var emphasis = document.createElement("em");
    var em_txt = document.createTextNode(" joe ");
    emphasis.appendChild(em_txt);

    var txt_2 = document.createTextNode(" great");
    para.appendChild(txt_2);

    para.insertBefore(emphasis, txt_2);
}
